import { RouteRecordRaw } from 'vue-router'
import { microAppConfigs } from '@/config/micro-config'

/**
 * 微应用动态路由
 */
export const microAppRoutes: Array<RouteRecordRaw> = microAppConfigs.map(v => {
  return {
    path: `${v.publicPath}/:page*`,
    name: v.name,
    component: () => import(/* webpackChunkName: "micro" */ '@/views/MicroApplication/index.vue'),
    meta: { title: '微应用', requiresAuth: true }
  }
})
